<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //如果一个变量声明但未赋值，就是undefined 未定义数据类型
        var str;
        console.log(str);//undefined
        var variable = undefined;
        console.log(variable + 'pink');//undefinedpink
        console.log(variable + 1);//NaN undefined 和 数字相加 最后的结果是 NaN
        //null 空值
        var space = null;
        console.log(space + 'pink');//nullpink
        console.log(space + 1);//1
    </script>
</head>

<body>

</body>

</html>